package threeD.Csg;

import twoD.Csg.CsgNode;
import inf.v3d.obj.*;
import inf.v3d.view.Viewer;

public class OctTree {

	private OctTreeNode root;
	private CsgNode N;

	public OctTree(CsgNode N, double ox, double oy, double oz, double size,
			int depth) {
		this.N = N;
		this.root = new OctTreeNode(N, ox, oy, oz, size);
		this.root.refine(N, depth);
	}

	public void draw(Viewer v) {
		Polyline P = new Polyline();
		this.root.draw(N, P);
		P.setColor("black");
		v.addObject3D(P);
	}
}
